<template>
  <div>
    <div class="item" v-for="(item,index) of categoryList" :key="index">
      <div class="item-title border-bottom">
        <span class="iconfont item-title-icon">&#xe640;</span>
        <!-- 图标没颜色 -->
        {{item.title}}
      </div>
      <div v-if="item.children" class="item-children">
        <detail-list :categoryList="item.children"></detail-list>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: 'DetailList',
  props: {
    categoryList: Array
  }
}

</script>

<style lang="stylus" scoped>
  .item-title
    line-height: 2.5rem
    padding: 0 1rem
  .item-children
    padding: 0 1rem
</style>








